<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Website extends Model
{
    protected $fillable = ['url', 'status'];

    public function monitoringRecords()
    {
        return $this->hasMany(MonitoringRecord::class);
    }

    public function monitoringRecord()
    {
        return $this->hasOne(MonitoringRecord::class);
    }

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function mailLogs()
    {
        return $this->hasMany(MailLog::class);
    }
}
